/**
 * Baidu.com Inc.
 * Copyright (c) 2022 All Rights Reserved.
 */
package guaduation.processTemplate;

import guaduation.dataEncapusulation.AbstractEncapusulation;
import guaduation.exception.FailException;
import guaduation.service.AbstractNetworkService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author wangjiajun06
 * @version 1.0
 * @description
 * @date 2022/1/18 3:26 下午
 */
public abstract class AbstractProcessTemplate {

    static Logger logger = LoggerFactory.getLogger(AbstractNetworkService.class);

    AbstractNetworkService networkService;
    AbstractEncapusulation encapusulation;

    /**
     * 数据封装到指定类中
     * @param data
     */
    public abstract void encapusulate(byte[] data);

    /**
     * 处理数据，如错误码等
     * @throws FailException
     */
    public abstract void processData() throws FailException;

    /**
     * 网络传输数据
     */
    public abstract void doNetwork();
}
